﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AgileTimeTracker.Client.Wpf.Common
{
    public class PageViewModel : BaseViewModel
    {
        public RelayCommand CloseCommand { get; set; }

        public Action OnRequestClose { get; set; }

        protected virtual void Close()
        {
            if (this.OnRequestClose != null)
            {
                this.OnRequestClose();
            }
        }

        protected override void InititalizeCommands()
        {
            base.InititalizeCommands();
            this.CloseCommand = new RelayCommand(this.Close);
        }
    }
}
